VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   2688
   ClientLeft      =   132
   ClientTop       =   360
   ClientWidth     =   7344
   Icon            =   "Form1.frx":0000
   LinkTopic       =   "Form1"
   ScaleHeight     =   2688
   ScaleWidth      =   7344
   StartUpPosition =   1  'CenterOwner
   Begin VB.Image Image1 
      BorderStyle     =   1  'Fixed Single
      Height          =   1800
      Index           =   3
      Left            =   4920
      Stretch         =   -1  'True
      Top             =   804
      Width           =   2400
   End
   Begin VB.Image Image1 
      BorderStyle     =   1  'Fixed Single
      Height          =   1800
      Index           =   2
      Left            =   2460
      Stretch         =   -1  'True
      Top             =   804
      Width           =   2400
   End
   Begin VB.Image Image1 
      BorderStyle     =   1  'Fixed Single
      Height          =   1800
      Index           =   1
      Left            =   0
      Stretch         =   -1  'True
      Top             =   804
      Width           =   2400
   End
   Begin VB.Label Label1 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BackStyle       =   0  'Transparent
      BorderStyle     =   1  'Fixed Single
      Caption         =   "Font test"
      ForeColor       =   &H80000008&
      Height          =   732
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   7272
      WordWrap        =   -1  'True
   End
   Begin VB.Menu mnuFile 
      Caption         =   "&File"
      Begin VB.Menu mnuOpenNormal 
         Caption         =   "Normal Open"
      End
      Begin VB.Menu mnuFileOpen 
         Caption         =   "Subclassed Open"
      End
      Begin VB.Menu mnuFileSave 
         Caption         =   "Subclassed Save As"
      End
      Begin VB.Menu mnuFilemultiopen 
         Caption         =   "Subclassed Multiopen"
      End
      Begin VB.Menu mnuFolderSelect 
         Caption         =   "Subclassed Folder Selection"
      End
      Begin VB.Menu mnuPrint 
         Caption         =   "Print"
      End
   End
   Begin VB.Menu mnuFont 
      Caption         =   "Font"
      Begin VB.Menu mnuFontSelect 
         Caption         =   "Select Font"
      End
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Form_Load()
    '------------------------------
    'The xpixel and ypixel values make it easier to
    'reference these screen properties.
    '------------------------------
    xPixel = Screen.TwipsPerPixelX
    yPixel = Screen.TwipsPerPixelY
    
    '---------------------------------------
    'These values would probably be initialized
    'by reading registry values for the application.
    '---------------------------------------
    AutoPreview = False
    LastLoadedPath = App.Path
    LastSavedPath = App.Path
    
    OsVers.dwVersionInfoSize = 148&
    GetVersionEx OsVers
    winOS = OsVers.dwPlatform
    If winOS = WinNT Then
        If OsVers.dwMajorVersion < 4 Then
            winOS = OldNT
        End If
    End If
    '---------------------------------------
    'We need to know if the program is running
    'in the VB5 environment.  Project/Properties/Make
    'has a command line set to "DEBUG" to make this
    'easy.
    '---------------------------------------
    If Command = "DEBUG" Then
        DebugMode = True
    End If
End Sub

Private Sub mnuFilemultiopen_Click()
    doLoadMultiFile
End Sub

Private Sub mnuFileOpen_Click()
    doLoadSingleFile SubClassed
End Sub
Private Sub mnuFileSave_Click()
    DoSaveAs
End Sub

Private Sub mnuFolderSelect_Click()
Dim FolderPath$
    FolderPath = GetPathInfo(App.Path)
    If FolderPath <> "" Then
        MsgBox "Folder selected was " & FolderPath
    Else
        MsgBox "No Folder selected"
    End If
End Sub

Private Sub mnuFontSelect_Click()
    TextEntry.Show vbModal
End Sub


Private Sub mnuOpenNormal_Click()
    doLoadSingleFile Normal
End Sub




Private Sub mnuPrint_Click()
    Dim objPrintDialog As New clsCommonDialog
    objPrintDialog.HookAddress = pAddressOf(AddressOf PrintProc)
    objPrintDialog.FLAGS = PD_ENABLEPRINTHOOK
    objPrintDialog.hwnd = hwnd
    objPrintDialog.ShowPrinter
    If objPrintDialog.APIReturn = False Then
        Set objPrintDialog = Nothing
        Exit Sub
    End If
    Set objPrintDialog = Nothing

End Sub


